﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using INNOVACALL.Framework.Common.MVCHelpers.Localization;
using InnovaApp.Layers.ResourcesLayer.Properties;

namespace InnovaApp.Layers.SecurityLayer.Models.MetaData
{
    public class Register_MetaData : _MetaData_Base
    {
        [Required]
        [DisplayNameLocalizedEntityAttribute(typeof(Resources), "Register", "Genre")]
        public int FK_Genre { get; set; }

        [Required]
        [DisplayNameLocalizedEntityAttribute(typeof(Resources), "Register", "FirstName")]
        public string FirstName { get; set; }

        [Required]
        [DisplayNameLocalizedEntityAttribute(typeof(Resources), "Register", "LastName")]
        public string LastName { get; set; }

        //Champs de base
        [Required]
        [DisplayNameLocalizedEntityAttribute(typeof(Resources), "Register", "Login")]
        public string UserName { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [DisplayNameLocalizedEntityAttribute(typeof(Resources), "Register", "EMail")]
        public string Email { get; set; }

        [Required]
        //[ValidatePasswordLength]
        //[DataType(DataType.Password)]
        [DisplayNameLocalizedEntityAttribute(typeof(Resources), "Register", "Password")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [DisplayNameLocalizedEntityAttribute(typeof(Resources), "MetaData_Register", "Confirmation")]
		[Compare("Password", ErrorMessageResourceName = "ErrMsgPassword_Compare_Mismatch", ErrorMessageResourceType = typeof(Resources))]
        public string ConfirmPassword { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [DisplayNameLocalizedEntityAttribute(typeof(Resources), "MetaData_Register", "SecurityQuestion")]
        public string SecurityQuestion { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [DisplayNameLocalizedEntityAttribute(typeof(Resources), "MetaData_Register", "SecurityQuestionAnswer")]
        public string SecurityAnswer { get; set; }
    }
}
